/* eslint-disable indent */
/* eslint-disable max-len */
import service from './service';

const http: any = (url: string, method: any, data = {}, params = {}) => new Promise((resolve, reject) => {
    service.request({
        url, method, data, params,
    }).then((res) => {
        resolve(res);
    }).catch((err) => {
        reject(err);
    });
});

export default http;
